package com.ys.http.network;

import okhttp3.ResponseBody;
import retrofit2.Response;

public class ResponseSync {
    public Exception error;
    private Response<ResponseBody> response;

    public int code;
    public ResponseBody body;
    public ResponseBody errorBody;

    public ResponseSync(Exception error) {
        this.error = error;
    }

    public ResponseSync(Response<ResponseBody> response) {
        this.response = response;
        code = response.code();
        body = response.body();
        errorBody = response.errorBody();
    }

    public Response<ResponseBody> getResponse() {
        return response;
    }
}
